//
//  UIView+XYAdd.h
//  PeiJue
//
//  Created by lxy on 2017/9/27.
//  Copyright © 2017年 lixiya. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface UIView (XYAdd)
@property (nonatomic) CGFloat left;
@property (nonatomic) CGFloat top;
@property (nonatomic) CGFloat right;
@property (nonatomic) CGFloat bottom;

@property (nonatomic) CGFloat width;
@property (nonatomic) CGFloat height;

@property (nonatomic) CGFloat centerX;
@property (nonatomic) CGFloat centerY;

@property (nonatomic) CGPoint origin;
@property (nonatomic) CGSize  size;


- (void)setRadius:(CGFloat)r;

/**
 *  添加边框:四边 颜色 圆角半径
 */
- (void)setBorder:(UIColor *)color width:(CGFloat)width radius:(CGFloat)radius;


/**
 *  添加点点击手势
 */
- (void)addTapGesturesTarget:(id)target selector:(SEL)selector;


- (CGFloat)visibleAlpha;

/**
 *  自动从xib创建视图
 */
+ (instancetype)viewFromXIB;

/** 递归获取子视图 */
+ (void)getSub:(UIView *)view andLevel:(int)level;



@end
